package cn.luckywh.pojo;

import lombok.Data;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

/**
 * @author W.
 * @date 2020/12/8 16:44
 */
//等价于    <bean id="user" class="cn.luckywh.pojo.User"></bean>
@Data
@Component //组件相当于new了一个对象
public class User {

    @Value("喜洋洋")
    private String name;
}
